# Makefile made from Makefile for the ROOT test programs.
# Author: Fons Rademakers, 29/2/2000
# Modified: Max Nolte, 21/10/2013

RC     := root-config
ifeq ($(findstring $(MAKECMDTARGET),clean),)
ifeq ($(shell which $(RC) 2>&1 | sed -ne "s@.*/$(RC)@$(RC)@p"),$(RC))
MKARCH := $(wildcard $(shell $(RC) --etcdir)/Makefile.arch)
RCONFIG := $(wildcard $(shell $(RC) --incdir)/RConfigure.h)
endif
ifneq ($(MKARCH),)
include $(MKARCH)
else
ifeq ($(ROOTSYS),)
ROOTSYS = ..
endif
include $(ROOTSYS)/etc/Makefile.arch
endif
endif

ifeq ($(ROOTSYS),)
ROOTSYS = ..
endif
-include ../MyConfig.mk

#------------------------------------------------------------------------------

#HWORLDO       = hworld.$(ObjSuf)
#HWORLDS       = hworld.$(SrcSuf)
#HWORLD        = hworld$(ExeSuf)

HISTCOMBINED1O       = likelihood.$(ObjSuf) treeCreationLHEDict.$(ObjSuf)
HISTCOMBINED1S       = likelihood.$(SrcSuf) treeCreationLHEDict.$(SrcSuf)
HISTCOMBINED1        = likelihood


OBJS          = $(HISTCOMBINED1O)
PROGRAMS      = $(HISTCOMBINED1)

#------------------------------------------------------------------------------

.SUFFIXES: .$(SrcSuf) .$(ObjSuf)
.PHONY:	clean

all:            $(PROGRAMS)

$(HISTCOMBINED1):	$(HISTCOMBINED1O)
			$(LD) $(LDFLAGS) $^ $(LIBS) $(OutPutOpt)$@
			$(MT_EXE)
			@echo "$@ done"

clean:
		@rm -f $(OBJS)

.$(SrcSuf).$(ObjSuf):
	$(CXX)  $(CXXFLAGS) -c $<

likelihood.$(ObjSuf):	likelihood.h
treeCreationLHEDict.$(SrcSuf):	likelihood.h
				@echo "Generating dictionary $@..."
				$(ROOTCLING) -f $@ -c $^
